<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@taglib prefix="s" uri="/struts-tags"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<base href="<%=basePath%>">

		<title>更新物品外借记录</title>
		<link rel="stylesheet"
			href="<%=request.getContextPath()%>/css/common.css" type="text/css" />
		<script type='text/javascript'
			src='<%=request.getContextPath()%>/dwr/interface/registerInfoTypeAction.js'></script>
		<script type='text/javascript'
			src='<%=request.getContextPath()%>/dwr/engine.js'></script>
		<script type='text/javascript'
			src='<%=request.getContextPath()%>/dwr/util.js'></script>
		<script charset="gb2312" type="text/javascript"
			src="<%=request.getContextPath()%>/js/N13FormValidation-2.js"></script>
		<script type="text/javascript">
		window.onload=init;
		function init(){
			setRegisterInfoTypeList();
		}
		/**
		* 给apart select框赋值的
		*/
				function setRegisterInfoTypeList() {
					registerInfoTypeAction.getAllRegisterInfoType(ritCallBack);
				}
				var ritCallBack = function setList(ritList)//回调函数
				{				
					var s=$("registerInfoTypeName");
					DWRUtil.removeAllOptions(s); 
					s.options[0] = new Option("请选择物品类型",'0');
					for ( var i = 1; i < ritList.length+1; i++) {
						var opt = new Option(ritList[i-1].registerinfotypename,
								ritList[i-1].registerinfotypeid);
						s.options[i] = opt;
					}
				}
				/**
				* 公寓select框change函数
				*/
				function selectChange(){
					
				}
		</script>

	</head>
	<body>
		<div id="page_container">
			<h2>
				物品外借记录详情
			</h2>
			<s:form theme="simple"
				action="registerinfo/updateregisterinfo.action" method="post">
				<s:hidden name="ri.registerinfoid" />
				<s:hidden name="ri.registerinfoind" />
				<table class="table_common">
					<tr>
						<td class="td_left">
							学生学号：
						</td>
						<td class="td_right">
							<s:textfield name="ri.registuserstudentno" />
						</td>
					</tr>
					<tr>
						<td class="td_left">
							学生姓名：
						</td>
						<td class="td_right">
							<s:textfield name="ri.registusername" />
						</td>
					</tr>
					<tr>
						<td class="td_left">
							所借物品类型：
						</td>
						<td class="td_right">
							<select name="ri.registerinfotype.registerinfotypeid"
								id="registerInfoTypeName" onchange="javascript:selectChange();">
							</select>
						</td>
					</tr>
					<tr>
						<td class="td_left">
							物品借出时间：
						</td>
						<td class="td_right">
							<s:date name="ri.registerinfotime" format="yyyy-MM-dd hh:mm" />
							<s:hidden name="ri.registerinfotime"></s:hidden>
						</td>
					</tr>
					<tr>
						<td class="td_left">
							物品归还时间：
						</td>
						<td class="td_right">
							<s:date name="ri.registereturntime" format="yyyy-MM-dd hh:mm" />
							<s:hidden name="ri.registereturntime"></s:hidden>
						</td>
					</tr>
					<tr class="row_even">
						
					</tr>
				</table>
			</s:form>
		</div>
	</body>
</html>
